//Copyright (c) 2006-2007 Microsoft Corporation.  All rights reserved
using System;

using InvocationFramework.Common;

namespace InvocationFramework.Core
{
    /// <summary>
    /// Esta clase se utiliza internamente para pasar los parametros en una ejecucion asincronica
    /// </summary>
    /// <author>Rodolfo Finochietti 30/11/2005 11.52</author>
    internal class AsyncExecutionThreadPoolQueueItem
    {
        #region Constructors

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="executionCompletedEvent">Evento a despachar</param>
        /// <param name="sender">Sender del evento</param>
        /// <param name="executionInformation">Informacion de la invocacion del servicio</param>
        public AsyncExecutionThreadPoolQueueItem( EventHandler<AsyncExecutionCompletedEventArgs> executionCompletedEvent, object sender, InvocationInformation executionInformation )
        {
            _executionCompletedEvent = executionCompletedEvent;
            _sender = sender;
            _executionInformation = executionInformation;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Variable privada para el manejo de la propiedad
        /// </summary>
        private EventHandler<AsyncExecutionCompletedEventArgs> _executionCompletedEvent;

        /// <summary>
        /// Evento a despachar
        /// </summary>
        public EventHandler<AsyncExecutionCompletedEventArgs> ExecutionCompletedEvent
        {
            get
            {
                return _executionCompletedEvent;
            }
        }

        /// <summary>
        /// Variable privada para el manejo de la propiedad
        /// </summary>
        private object _sender;


        /// <summary>
        /// Sender del evento
        /// </summary>
        public object Sender
        {
            get
            {
                return _sender;
            }
        }

        /// <summary>
        /// Variable privada para el manejo de la propiedad
        /// </summary>
        private InvocationInformation _executionInformation;

        /// <summary>
        /// Informacion de la invocacion del servicio
        /// </summary>
        public InvocationInformation ExecutionInformation
        {
            get
            {
                return _executionInformation;
            }
        }

        #endregion
    }
}